package com.asp.alumnisystem.presenter;

import com.asp.alumnisystem.app.App;
import com.asp.alumnisystem.base.BaseBean;
import com.asp.alumnisystem.base.BasePresenter;
import com.asp.alumnisystem.base.IView;
import com.asp.alumnisystem.model.PageModel;
import com.asp.alumnisystem.model.UserModel;
import com.asp.alumnisystem.net.RetrofitManager;

import java.util.List;

import io.reactivex.Observable;

/**
 * 首页请求好友信息的Presenter
 */
public class FriendPresenter extends BasePresenter<PageModel, List<UserModel>> {

    public FriendPresenter(IView view) {
        super(view);
    }

    @Override
    protected Observable<BaseBean<List<UserModel>>> requestNet(PageModel pageModel) {
        return RetrofitManager.getApi().getFriendList(App.getApp().getUserId(), pageModel.getNowPage(), pageModel.getPageSize());
    }
}
